<?php

namespace plugin\ssh\app\controller;

use app\common\util\YcLog;
use plugin\ssh\app\model\Admin;

class IndexController
{
    public function index()
    {
        $config = config("plugin.ssh.database");

        return json(array_merge(['name' => 'ssh', "hello" => "yes 我"], $config));
        //        return view('index/index', ['name' => 'ssh']);
    }

    public function testdb()
    {
        YcLog::init("ssh");
        YcLog::debug("testdb 开始");
        $adminList = Admin::where("valid", "1")->select();
        YcLog::debug("testdb 结束");

        return json($adminList);
    }

    public function info()
    {
        phpinfo();
    }
}
